<?php

/**
 * DetallePaqueteCaracteristica form base class.
 *
 * @method DetallePaqueteCaracteristica getObject() Returns the current form's model object
 *
 * @package    practil
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseDetallePaqueteCaracteristicaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                        => new sfWidgetFormInputHidden(),
      'descripcion'               => new sfWidgetFormInputText(),
      'paquete_id'                => new sfWidgetFormInputHidden(),
      'paquete_caracteristica_id' => new sfWidgetFormInputHidden(),
      'codigo_unidad_media'       => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'                        => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'descripcion'               => new sfValidatorString(array('max_length' => 255)),
      'paquete_id'                => new sfValidatorPropelChoice(array('model' => 'Paquete', 'column' => 'id', 'required' => false)),
      'paquete_caracteristica_id' => new sfValidatorPropelChoice(array('model' => 'PaqueteCaracteristica', 'column' => 'id', 'required' => false)),
      'codigo_unidad_media'       => new sfValidatorString(array('max_length' => 10)),
    ));

    $this->widgetSchema->setNameFormat('detalle_paquete_caracteristica[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'DetallePaqueteCaracteristica';
  }


}
